// @ts-ignore
/* eslint-disable */
import request from "@/libs/request";

/** favoriteQuestion POST /api/question/favorite/add */
export async function favoriteQuestionUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.favoriteQuestionUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/question/favorite/add", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** isQuestionFavorited GET /api/question/favorite/check */
export async function isQuestionFavoritedUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.isQuestionFavoritedUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/question/favorite/check", {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getUserFavoriteQuestions GET /api/question/favorite/list */
export async function getUserFavoriteQuestionsUsingGet(options?: {
  [key: string]: any;
}) {
  return request<API.BaseResponseListQuestion_>("/api/question/favorite/list", {
    method: "GET",
    ...(options || {}),
  });
}

/** unfavoriteQuestion POST /api/question/favorite/remove */
export async function unfavoriteQuestionUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.unfavoriteQuestionUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/question/favorite/remove", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
